package com.ruicar.afs.cloud.common.modules.dto.mq.loan.contractdto;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import com.ruicar.afs.cloud.common.modules.afscorebusiness.enums.AffiliatedWayEnum;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @param
 * @author yk.Li
 * @description 挂靠单位信息
 * @date 2020/7/8
 */
@Data
public class ContractAffiliatedUnitDTO {
    /**
     * 合同号
     */
    @JSONField(name = "contractNo")
    private String contractNo;
    /**
     * 车辆ID
     */
    @JSONField(name = "carId")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long carId;
    /**
     * 挂靠方式
     */
    @JSONField(name = "affiliatedType", serializeUsing = AfsEnumSerializer.class, deserializeUsing = AfsEnumDeserializer.class)
    private AffiliatedWayEnum affiliatedType;
    /**
     * 挂靠单位ID
     */
    @JSONField(name = "affiliatedId")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 挂靠公司/个体工商户名称/运营公司
     */
    @JSONField(name = "affiliatedName")
    private String affiliatedName;
    /**
     * 社会统一信用代码
     */
    @JSONField(name = "socUniCrtCode")
    private String socUniCrtCode;
    /**
     * 法人姓名
     */
    @JSONField(name = "legalName")
    private String legalPersonName;
    /**
     * 法人联系电话
     */
    @JSONField(name = "legalPhone")
    private String legalPersonTel;
    /**
     * 运营许可证有效期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(name = "licenceEndDate")
    private Date oprTermValidity;
    /**
     * 注册地址-省份
     */
    @JSONField(name = "registProvince")
    private String registeredProvince;
    /**
     * 注册地址-城市
     */
    @JSONField(name = "registCity")
    private String registeredCity;
    /**
     * 注册地址-详细
     */
    @JSONField(name = "registAddress")
    private String registeredAddress;
    /**
     * 平台ID
     */
    @JSONField(name = "platformId")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long platformId;
    /**
     * 合作平台
     */
    @JSONField(name = "cooperPlatform")
    private String cooperPlat;

}
